<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="refresh" content="20">
<meta http-equiv="Content-Type" content="text/html; charset=utf8"  />
<title>cloudstack 统计表</title> 
<style type="text/css">
table.hovertable {
    font-family: verdana,arial,sans-serif;
    font-size:11px;
    color:#333333;
    border-width: 1px;
    border-color: #999999;
    border-collapse: collapse;
}
table.hovertable th {
    background-color:#c3dde0;
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #a9c6c9;
}
table.hovertable tr {
    background-color:#d4e3e5;
}
table.hovertable td {
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #a9c6c9;
}
ul
{
list-style-type:none;
margin:0;
padding:0;
overflow:hidden;
}
li
{
float:left;
}
a:link,a:visited
{
display:block;
width:120px;
font-weight:bold;
color:#FFFFFF;
background-color:#98bf21;
text-align:center;
padding:4px;
text-decoration:none;
text-transform:uppercase;
}
a:hover,a:active
{
background-color:#7A991A;
}
</style>
</head>
<BODY align="center" valign="center">  
<DIV class="box">
<h3><strong>Cloudstack 报表
</strong>
<hr></hr>
<ul>
<li><a href="/">主页</a></li>
<li><a href="/instance_list">实例</a></li>
<li><a href="/vm_status">状态</a></li>
</ul>
<hr></hr>
<h3>实例列表</h3>
<table width="1500" border="0" cellspacing="1" cellpadding="0"  class="hovertable" > 
<tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
    <td><strong>实例ID</strong></td>
    <td><strong>名称</strong></td>
    <td><strong>内部名称</strong></td>
    <td><strong>用户</strong></td>
    <td><strong>模板名称</strong></td>
    <td><strong>所在主机</strong></td>
    <td><strong>来宾IP地址</strong></td>
    <td><strong>创建时间</strong></td>
    <td><strong>状态</strong></td>
  </tr>
  {% for ints in instances %}
  <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
    <td>{{ints.id}}</td>
    <td>{{ints.NAME}}</td>
    <td>{{ints.instance_name}}</td>
     <td>{{ints.account}}</td>
     <td>{{ints.template_name}}</td>
    <td>{{ints.name}}</td>
    <td>{{ints.private_ip_address}}</td>
    <td>{{ints.created |date:"SHORT_DATETIME_FORMAT"}}</td>
     {% if ints.state != 'Running' %}
    <td bgcolor="#FF99CC" >{{ints.state}}</td>
    {% else %}
    <td>{{ints.state}}</td>
    {% endif %}
  </tr>
  {% endfor %}
</table>
</p>
<h3>数据中心列表</h3>
<table width="1500" border="0" cellspacing="1" cellpadding="0" class="hovertable" > 
  <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
    <td><strong>数据中心ID</strong></td>
    <td><strong>名称</strong></td>
    <td><strong>网络类型</strong></td>
    <td><strong>来宾网络范围</strong></td>
    <td><strong>本地存储是否启用</strong></td>
  </tr>
  {% for zone in zones %}
  <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
    <td>{{zone.id}}</td>
    <td>{{zone.NAME}}</td>
    <td>{{zone.networktype}}</td>
    <td>{{zone.guest_network_cidr}}</td>
    <td>{{zone.is_local_storage_enabled}}</td>
  </tr>
  {% endfor %}
</table>
</P>
<h3>模板列表</h3>
<table width="1500" border="0" cellspacing="1" cellpadding="0" class="hovertable" > 
  <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
    <td><strong>模板ID</strong></td>
    <td><strong>名称</strong></td>
    <td><strong>用户类型</strong></td>
    <td><strong>虚拟格式</strong></td>
    <td><strong>目录</strong></td>
  </tr>
  {% for template in templates %}
  <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
    <td>{{template.id}}</td>
    <td>{{template.NAME}}</td>
    <td>{{template.TYPE}}</td>
    <td>{{template.FORMAT}}</td>
    <td>{{template.install_path}}</td>
  </tr>
  {% endfor %}
</table>
</P>


<h3>计算方式列表</h3>
<table width="1500" border="0" cellspacing="1" cellpadding="0" class="hovertable" > 
  <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
    <td><strong>计算方式ID</strong></td>
    <td><strong>名称</strong></td>
    <td><strong>CPU核数</strong></td>
    <td><strong>CPU数量</strong></td>
    <td><strong>内存</strong></td>
    <td><strong>主机标签</strong></td>
    <td><strong>网络QoS</strong></td>
    <td><strong>VM_type</strong></td>
    <td><strong>本地存储</strong></td>
    <td><strong>HA启用</strong></td>
  </tr>
  {% for computes in compute_offerings %}
  <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
    <td>{{computes.id}}</td>
    <td>{{computes.NAME}}</td>
    <td>{{computes.cpu}} 核</td>
    <td>{{computes.speed}} Hz</td>
    <td>{{computes.ram_size}} M</td>
    <td>{{computes.host_tag}}</td>
    {% if computes.nw_rate == None %}
      <td>25M</td>
    {% else %}
   	  <td>{% widthratio computes.nw_rate 8 1 %} M</td>
    {% endif %}
    <td>{{computes.vm_type}}</td>
    {% if computes.use_local_storage == 1 %}
    <td>启用</td>
    {% else %}
    <td>未启用</td>
    {% endif %}
    {% if computes.ha_enabled == 1 %}
     <td>启用</td>
    {% else %}
    <td>未启用</td>
    {% endif %}  </tr>
  {% endfor %}
</table>
</P>

<h3>磁盘列表</h3>
<table width="1500" border="0" cellspacing="1" cellpadding="0" class="hovertable" > 
  <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
    <td><strong>磁盘ID</strong></td>
    <td><strong>名称</strong></td>
    <td><strong>所属实例</strong></td>
    <td><strong>磁盘类型</strong></td>
    <td><strong>容量</strong></td>
    <td><strong>状态</strong></td>
    <td><strong>创建时间</strong></td>
  </tr>
  {% for storage in storages %}
  <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
    <td>{{storage.id}}</td>
    <td>{{storage.NAME}}</td>
    <td>{{storage.instance_name}}</td>
    <td>{{storage.volume_type}}</td>
    <td>{% widthratio storage.size 1073741824 1 %} G</td>
    <td>{{storage.state}}</td>
    <td>{{storage.created |date:"SHORT_DATETIME_FORMAT"}}</td>
  </tr>
  {% endfor %}
</table>
</P>
<h3>网络列表</h3>
<table width="1500" border="0" cellspacing="1" cellpadding="0" class="hovertable" > 
  <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
    <td><strong>网络ID</strong></td>
    <td><strong>名称</strong></td>
    <td><strong>VLAN_ID</strong></td>
    <td><strong>网络地址</strong></td>
    <td><strong>网关</strong></td>
    <td><strong>创建时间</strong></td>
  </tr>
  {% for network in networks %}
  <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
    <td>{{network.id}}</td>
    <td>{{network.NAME}}</td>
    <td>{{network.broadcast_uri}}</td>
    <td>{{network.cidr}}</td>
    <td>{{network.gateway}}</td>
    <td>{{network.created |date:"SHORT_DATETIME_FORMAT"}}</td>
  </tr>
  {% endfor %}
</table>
</P>
<hr></hr>
<table width="1500" border="0" cellspacing="1" cellpadding="0" > 
  <tr>
    <td align="right" >2013 版本：1.0</td>
  </tr>
</table>
</DIV>
</body>
</html>
